<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="style3.css" rel="stylesheet" />
	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css" />
<link rel="stylesheet" href="css/themes/first_mobile.css" />
  <link rel="stylesheet" href="css/themes/jquery.mobile.icons.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
<script type="text/javascript" src="getLocation.js"></script>
</head>

<body>
<div data-role="page" id="update" >
<div data-role="header">
<h1> update the location to server</h1>
<div data-role="navbar">
	<ul>
    	<li> <button onclick="uploadLocation(1)" > update </button></li>
        <li> <button onclick="uploadLocation(2)" > up_for_wan</button></li>
        <li> <button onclick=''> show </button></li>
        <li> <button onclick="" > home </button></li>
    </ul>
</div>
</div>

<div data-role="body">
	    <div id='container'>status</div>  
</div>
<div data-role="footer">
copyright xia
</div>


</div>

</body>
<script type="text/javascript">
getLocation();
function uploadLocation(id)
{
	var xmlHttp = new XMLHttpRequest();
	xmlHttp.open('GET','position_stored.php?lati='+sessionStorage.lati+'&longi='+sessionStorage.longi+'&id='+id,true);
	xmlHttp.send(null);
	document.getElementById('container').innerHTML=sessionStorage.lati + '</br>' + sessionStorage.longi;
	
}

</script>
</html>